import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
    {
        path: "/",
        name: "Login",
        component: () => import("../views/Users/Login.vue")
    },
    {
        path: "/Register",
        name: "Register",
        component: () => import("../views/Users/Register.vue")
    },
    {
        path: "/UserRegister/:Uid",
        name: "UserRegister",
        component: () => import("../views//Users/UserRegister.vue")
    },
    {
        path: "/AddInvestPage",
        name: "AddInvestPage",
        component: () => import("../views//Invests/AddInvestPage.vue")
    },
    {
        path: "/ShowInvestPage",
        name: "ShowInvestPage",
        component: () => import("../views/Invests/ShowInvestPage.vue")
    },
    {
        path: "/EditInvestPage/:Iid",
        name: "EditInvestPage",
        component: () => import("../views/Invests/EditInvestPage.vue")
    },
    {
        path: "/AddFinanPage",
        name: "AddFinanPage",
        component: () => import("../views/Finans/AddFinanPage.vue")
    },
    {
        path: "/ShowFinanPage",
        name: "ShowFinanPage",
        component: () => import("../views/Finans/ShowFinanPage.vue")
    },
    {
        path: "/Index",
        name: "Index",
        component: () => import("../views/Users/Index.vue")
    },
    {
        path: "/UserShowInvestPage",
        name: "UserShowInvestPage",
        component: () => import("../views/Invests/UserShowInvestPage.vue")
    },
    {
        path: "/UserInvestInfo/:Iid",
        name: "UserInvestInfo",
        component: () => import("../views/Invests/UserInvestInfo.vue")
    },
    {
        path: "/AdminInvestInfo",
        name: "AdminInvestInfo",
        component: () => import("../views/Invests/AdminInvestInfo.vue")
    },
    {
        path: "/AdminInvestInfoPage/:Iid",
        name: "AdminInvestInfoPage",
        component: () => import("../views/Invests/AdminInvestInfoPage.vue")
    },
    {
        path: "/UserFinanShowPage/:ULid",
        name: "UserFinanShowPage",
        component: () => import("../views/Finans/UserFinanShowPage.vue")
    },
    {
        path: "/UserBuyFinanPage/:Fid/:ULid",
        name: "UserBuyFinanPage",
        component: () => import("../views/Finans/UserBuyFinanPage.vue")
    },
    {
        path: "/AdminFinanShowPage",
        name: "AdminFinanShowPage",
        component: () => import("../views/Finans/AdminFinanShowPage.vue")
    },
    {
        path: "/AdminSearchUserFinanInfo/:Fid",
        name: "AdminSearchUserFinanInfo",
        component: () => import("../views/Finans/AdminSearchUserFinanInfo.vue")
    },
    {
        path: "/Home",
        name: "Home",
        component: () => import("../views/Home.vue")
    },
    {
        path: "/ShowInvestManage",
        name: "ShowInvestManage",
        component: () => import("../views/Invests/ShowInvestManage.vue")
    },
    {
        path: "/UserRedeemInvest/:UIid",
        name: "UserRedeemInvest",
        component: () => import("../views/Invests/UserRedeemInvest.vue")
    },
    {
        path: "/AdminRedeemInvest",
        name: "AdminRedeemInvest",
        component: () => import("../views/Invests/AdminRedeemInvest.vue")
    },
    {
        path: "/AllUserRedeemInvestPage/:Iid",
        name: "AllUserRedeemInvestPage",
        component: () => import("../views/Invests/AllUserRedeemInvestPage.vue")
    },
    {
        path: "/UserFinanRedeemInfo",
        name: "UserFinanRedeemInfo",
        component: () => import("../views/Finans/UserFinanRedeemInfo.vue")
    },
    {
        path: "/UserFinanRedeemPage/:UFid",
        name: "UserFinanRedeemPage",
        component: () => import("../views/Finans/UserFinanRedeemPage.vue")
    },
    {
        path: "/AdminShowAllFinan",
        name: "AdminShowAllFinan",
        component: () => import("../views/Finans/AdminShowAllFinan.vue")
    },
    {
        path: "/AdminShouUserRedeemInfo/:Fid",
        name: "AdminShouUserRedeemInfo",
        component: () => import("../views/Finans/AdminShouUserRedeemInfo.vue")
    },
    {
        path: "/UserInfo/:Uid",
        name: "UserInfo",
        component: () => import("../views/Users/UserInfo.vue")
    },
    {
        path: "/AdminCheckUserInfo",
        name: "AdminCheckUserInfo",
        component: () => import("../views/Users/AdminCheckUserInfo.vue")
    },
    {
        path: "/ShowUserAsset",
        name: "ShowUserAsset",
        component: () => import("../views/Users/ShowUserAsset.vue")
    },
    {
        path: "/ShowAssetInfo",
        name: "ShowAssetInfo",
        component: () => import("../views/Users/ShowAssetInfo.vue")
    }
]


const router = createRouter({
    //路由模式
    history: createWebHistory(),
    //存放路由信息
    routes
})

//导出Router
export default router